
$(document).ready(function() {

    var html = '';
    html =  '<div class="modal fade" style="z-index: 1060;" id="modal-msg" tabindex="-1" role="dialog" aria-labelledby="modal-default" aria-hidden="true">';
    html += '<div class="modal-dialog modal-dialog-centered" role="document"><div class="modal-content"><div class="modal-body"><p  id="modal-msg-body"></p></div>';
    html += '<div class="modal-footer"><button type="button" class="btn btn-primary" data-dismiss="modal">知道了</button></div></div></div></div>';
    $("body").append(html);

    html = '';
    html =  '<div class="modal fade" id="modal-open" tabindex="-1" role="dialog" aria-labelledby="modal-form" aria-hidden="true">';
    html += '<div class="modal-dialog modal- modal-dialog-centered modal-sm" role="document"><div class="modal-content"><div class="modal-body p-0" id="modal-open-body">';
    html += '</div></div></div></div>';
    $("body").append(html);

    //g_open($('#tp_one').first().html());

    //g_open($("#tp_one").html());


 });

function g_msg(content) {
    $("#modal-msg").modal();
    $("#modal-msg-body").html(content);
}
function g_msg_close(content) {
    $("#modal-msg").modal('hide');
}

function g_open(html) {
    $("#modal-open").modal();
    $("#modal-open-body").html(html);
}

function g_open_close(html) {
    $("#modal-open").modal('hide');
}

function getCookie(name) {
    var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
    if(arr=document.cookie.match(reg))
        return decodeURIComponent(arr[2]);
    else
        return null;
}
function delCookie(name){
    var exp = new Date();
    exp.setTime(exp.getTime() - 1);
    var cval=getCookie(name);
    if(cval!=null)
        document.cookie= name + "="+cval+";expires="+exp.toGMTString();
}

